/*
 * DrawList.h
 *
 *  Created on: 2012/07/07
 *      Author: weihe
 */

#ifndef DRAWLIST_H_
#define DRAWLIST_H_

#include <list>
#include "Drawable.h"

using namespace std;

namespace object {

class DrawList: public virtual object::Drawable {
	bool autoRelease;
	list<Drawable*> drawableList;
public:
	DrawList(bool autoRelease = true) :
			autoRelease(autoRelease)
	{
	}
	virtual ~DrawList();
	virtual bool update(float dt);
	DrawList& operator<<(Drawable *obj);
	virtual void draw();
	list<Drawable*>& getList()
	{
		return drawableList;
	}
};

} /* namespace object */
#endif /* DRAWLIST_H_ */
